/*
 *  Arrow
 *
 *  Created by David Giovannini on 1/5/07.
 *  Copyright 2007 Software by Jove. All rights reserved.
 *
 */
 
#include "SBJ/Arrow/Channel.h"
#include "SBJ/Arrow/SynchronousMsg.h"

#include <boost/test/auto_unit_test.hpp>
#include <boost/pool/pool.hpp>
#include <boost/pool/pool_alloc.hpp>

BOOST_AUTO_TEST_CASE(Allocator)
{
	::printf("Allocator\n");
	
	SBJ::Arrow::Channel channel;
	boost::fast_pool_allocator< SBJ::Arrow::SynchronousMsg > alloc;
	SBJ::Arrow::Publication& pub = channel.publishWithAlloc< SBJ::Arrow::SynchronousMsg >( alloc );

	SBJ::Arrow::SynchronousMsg message( pub.getTopic() );

	channel.start();

	channel.onMessage( message );
	message.wait();
}